package com.su.lesson05;

import javax.swing.*;
import java.awt.*;
//多选框

public class ButtonDemo03 extends JFrame {
  public ButtonDemo03() {
      Container container = getContentPane();
      container.setLayout(new GridLayout(3,2));

      //多选框
      JCheckBox checkBox1 = new JCheckBox("CheckBox - 1");
      JCheckBox checkBox2 = new JCheckBox("CheckBox - 2");
      JCheckBox checkBox3 = new JCheckBox("CheckBox - 3");
      container.add(checkBox1);
      container.add(checkBox2);
      container.add(checkBox3);

      setVisible(true);
      setSize(200,300);
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }

    public static void main(String[] args) {
        new ButtonDemo03();
    }
}
